/************************************************
* N7MG Arduino Thunderbolt GPS Status Display
*
* GOAL:
* Down and dirty simple quick way to end up with
* a nice looking standalone time / frequency reference.
* 
* I started my frequency reference project when I was a
* field tester for the Elecraft K3EXTREF accessory.  I
* liked the idea of having good frequency stability and
* having a reference that would also automatically and
* regularly calibrate my benchtop function generator.
  
  This sketch is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
************************************************/
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include "WProgram.h"
//#include "HardwareSerial.h"

#include <Trimble.h>

#include <LCD_driver.h>
#include <SoftwareSerial.h>

#define LINE_HEIGHT 16
#define gpsTX 6
#define gpsRX 7

//chose to use a bit-banged serial port for the GPS so that I could use
//the hardware port for debug. 
SoftwareSerial gps(gpsRX,gpsTX);
Trimble trimble;

byte gps_input[] = {0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x4C,0x49,0x66,0x3C,0x96,0xFE,0x7B,0x00,0x08,0x24,0x36,0x3D,0xB5,0x0E,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x4D,0xB1,0x5B,0x59,0xE8,0x2D,0xA2,0x20,0xEF,0x11,0x31,0xD4,0x57,0x18,0x1A,0xB2,0x16,0x59,0x4D,0x1B,0xB2,0x23,0x10,0x10,0x25,0x08,0x32,0x94,0x44,0xEB,0x1C,0x32,0xD0,0x01,0x27,0x0F,0xB3,0x10,0x10,0xA8,0x33,0x09,0xB2,0xA2,0xC9,0x5A,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x4E,0x06,0x5D,0x00,0x0F,0x03,0x2F,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0xC0,0x3D,0x0E,0xAE,0xBC,0x38,0x28,0x08,0x00,0x08,0x24,0x35,0x3D,0xB5,0x09,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x4E,0xB1,0x4A,0xFF,0xB0,0xAD,0x45,0xBC,0x84,0x11,0x31,0xD8,0x53,0x8F,0x1A,0xB2,0x17,0xD,0x6E,0x1B,0xB2,0x1C,0x1B,0xB7,0x08,0x32,0x94,0x03,0x60,0x1C,0x32,0xD3,0x7C,0x02,0x0F,0xB3,0x11,0xAD,0x7E,0x09,0xB2,0x9F,0x1F,0xA9,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x4F,0x06,0x5D,0x00,0x0F,0x03,0x30,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x30,0xF5,0x73,0xBC,0x8A,0x9,0x12,0x00,0x08,0x24,0x35,0x3D,0xB5,0x09,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x4F,0xB1,0x3E,0x02,0x0F,0xAD,0x95,0x27,0x68,0x11,0x31,0xDB,0x88,0x96,0x1A,0xB2,0x16,0xBE,0x3F,0x1B,0xB2,0x14,0x50,0x02,0x08,0x32,0x95,0x17,0xE6,0x1C,0x32,0xD8,0x78,0x6B,0x0F,0xB3,0x12,0xE9,0xB0,0x09,0xB2,0x9B,0x64,0xB4,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x50,0x06,0x5D,0x00,0x0F,0x03,0x31,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x22,0x29,0xBA,0x3C,0xB7,0xBE,0x3F,0x00,0x08,0x24,0x34,0x3D,0xB5,0x04,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0xE,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x50,0xB1,0x2E,0x1F,0x06,0x2D,0xC5,0x4A,0xEF,0x11,0x31,0xD9,0xDB,0x16,0x1A,0xB2,0x18,0xE0,0x94,0x1B,0xB2,0x0D,0x20,0xE8,0x08,0x32,0x96,0x67,0xA5,0x1C,0x32,0xDD,0xFD,0x06,0x0F,0xB3,0x13,0x4D,0x43,0x09,0xB2,0x98,0x86,0xFD,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x51,0x06,0x5D,0x00,0x0F,0x03,0x32,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x1A,0xFD,0x09,0x3C,0x14,0x29,0x54,0x00,0x08,0x24,0x34,0x3D,0xB5,0x04,0x00,0x42,0x0B,0x00,0x04,0x3F,0x8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x51,0xB1,0x26,0x6A,0xE4,0x2D,0x1F,0x16,0x4F,0x11,0x31,0xDB,0xB1,0x24,0x1A,0xB2,0x1A,0x69,0xD4,0x1B,0xB2,0x07,0x6D,0x6C,0x08,0x32,0x98,0xA7,0x5A,0x1C,0x32,0xE3,0x20,0x3F,0x0F,0xB3,0x13,0x4B,0x49,0x09,0xB2,0x92,0x33,0x93,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x52,0x06,0x5D,0x00,0x0F,0x03,0x33,0x14,0x06,0x02,04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x12,0x8,0xE9,0x3C,0xC9,0x67,0xA2,0x00,0x08,0x24,0x34,0x3D,0xB5,0x04,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x52,0xB1,0x1D,0x34,0xD2,0x2D,0xD8,0x41,0xBB,0x11,0x31,0xDB,0x4C,0xC8,0x1A,0xB2,0x1F,0xC0,0x85,0x1B,0xB2,0x04,0x63,0x96,0x08,0x32,0x9A,0x0C,0xB7,0x1C,0x32,0xE6,0x48,0xEF,0x0F,0xB3,0x13,0xC6,0x45,0x09,0xB2,0x8E,0x9C,0x93,0x00,0x00,0x00,0x00,00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x53,0x06,0x5D,0x00,0x0F,0x03,0x34,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0xF,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x09,0x2D,0xEC,0x3C,0x99,0x3E,0x83,0x00,0x08,0x24,0x34,0x3D,0xB5,0x04,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x53,0xB1,0x13,0x4B,0x95,0x2D,0xA4,0x8B,0x71,0x11,0x31,0xE1,0x1C,0xE4,0x1A,0xB2,0x22,0xA7,0xB4,0x1B,0xB2,0x04,0xBD,0xFC,0x08,0x32,0x9C,0x0A,0x37,0xC,0x32,0xEA,0xDB,0xB5,0x0F,0xB3,0x14,0x40,0x17,0x09,0xB2,0x8B,0x0D,0xE3,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x54,0x06,0x5D,0x00,0x0F,0x03,0x35,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0xC0,0x01,0x81,0x43,0x3C,0xD2,0x36,0xA8,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x54,0xB1,0x0B,0x0E,0x0B,0x2D,0xE1,0xB7,0x0C,0x11,0x1,0xE6,0xD7,0x94,0x1A,0xB2,0x21,0xE7,0xE1,0x1B,0xB2,0x05,0x3D,0x2E,0x08,0x32,0x9E,0xE9,0x89,0x1C,0x32,0xEE,0x72,0x0E,0x0F,0xB3,0x15,0xC5,0xF8,0x09,0xB2,0x87,0xB5,0x32,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x55,0x06,0x5D,0x00,0x0F,0x03,0x6,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0xBF,0xF9,0x04,0x3F,0x39,0xDB,0x10,0x10,0xFC,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x55,0xB1,0x05,0xB0,0x94,0x2A,0xEB,0x38,0x80,0x11,0x31,0xE6,0x3D,0x4D,0x1A,0xB2,0x23,0x6F,0x04,0x1B,0xB2,0x03,0x63,0xBC,0x08,0x32,0xA1,0x52,0xF8,0x1C,0x32,0xF1,0xDE,0xF7,0x0F,0xB3,0x16,0xBF,0x9A,0x09,0xB2,0x83,0xF9,0x7,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x56,0x06,0x5D,0x00,0x0F,0x03,0x37,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0xBF,0xE8,0x65,0xAD,0x3C,0xC9,0xE1,0x36,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x56,0xB0,0xF9,0x88,0xD9,0x2D,0xD8,0xC4,0x47,0x11,0x31,0xE1,0x06,0x12,0x1A,0xB2,0x25,0xF4,0x29,0x1B,0xB2,0x02,0x93,0x38,0x08,0x32,0xA1,0x40,0xF6,0x1C,0x32,0xF4,0xD9,0x6A,0x0F,0xB3,0x16,0xCA,0x60,0x09,0xB2,0x81,0x77,0x88,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x57,0x06,0x5D,0x00,0x0F,0x03,0x38,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xE7,0x06,0xB6,0xBC,0x05,0x6A,0xCE,0x00,0x08,0x24,0x33,0x3D,0x4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x57,0xB0,0xF8,0x10,0x10,00,0xAD,0x0F,0x41,0x71,0x11,0x31,0xDF,0x13,0xBA,0x1A,0xB2,0x23,0x9D,0x53,0x1B,0xB2,0x03,0x0E,0x80,0x08,0x32,0xA2,0xEC,0xF6,0x1C,0x32,0xF7,0x58,0xE4,0x0F,0xB3,0x15,0xAE,0x52,0x09,0xB2,0x7E,0x11,0x86,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x58,0x06,0x5D,0x00,0x0F,0x03,0x39,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xE2,0x9B,0xCD,0xBC,0x8F,0x69,0xF3,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x58,0xB0,0xF3,0x51,0xB3,0xAD,0x99,0xFD,0x4E,0x11,0x31,0xDC,0x6F,0xD6,0x1A,0xB2,0x25,0x8E,0x88,0x1B,0xB2,0x07,0x70,0x39,0x08,0x32,0xA3,0x58,0xEB,0x1C,0x32,0xF8,0xFC,0x81,0x0F,0xB3,0x15,0x8A,0x7E,0x09,0xB2,0x7D,0xC2,0xBC,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x59,0x06,0x5D,0x00,0x0F,0x03,0x3A,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0xA,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xE9,0x4D,0x26,0xBB,0x0F,0x55,0x66,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x59,0xB0,0xFA,0x81,0x64,0xAC,0x19,0xE7,0x3D,0x11,0x31,0xDD,0xBF,0xFD,0x1A,0xB2,0x25,0x43,0x32,0x1B,0xB2,0x0D,0x76,0xD4,0x08,0x32,0xA3,0x81,0x0B,0x1C,0x32,0xFA,0x35,0xD0,0x0F,0xB3,0x15,0x2D,0x56,0x09,0xB2,0x79,0xE0,0xCA,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x5A,0x06,0x5D,0x00,0x0F,0x03,0x3B,0x14,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0xD,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xE9,0x2B,0xFA,0xBC,0x0B,0xCE,0x36,00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x5A,0xB0,0xFA,0x5D,0xC6,0xAD,0x16,0x1D,0x72,0x11,0x31,0xDF,0x3A,0x04,0x1A,0xB2,0x29,0xCC,0xF1,0x1B,0xB2,0x10,0x10,0x82,0x77,0x08,0x32,0xA2,0xD5,0x4F,0x1C,0x32,0xFA,0xE4,0x28,0x0F,0xB3,0x14,0x1D,0xC8,0x09,0xB2,0x7B,0xBD,0xF5,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xB,0x00,0x08,0x42,0x5B,0x06,0x5D,0x00,0x0F,0x03,0x00,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xEC,0x28,0x3B,0x3A,0x8D,0xE8,0x43,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x5B,0xB0,0xFD,0x92,0x62,0x2B,0x98,0x5F,0x2C,0x11,0x31,0xDC,0x0A,0xD6,0x1A,0xB2,0x2A,0x0B,0xA2,0x1B,0xB2,0x14,0x85,0x3F,0x08,0x32,0xA0,0x40,0xD8,0x1C,0x32,0xFC,0x60,0x27,0x0F,0xB3,0x12,0x1F,0x55,0x09,0xB2,0x7C,0x51,0xF7,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x5C,0x06,0x5D,0x00,0x0F,0x03,0x01,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xE4,0x36,0x86,0xBB,0x91,0x8E,0x72,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x5C,0xB0,0xF5,0x0A,0xB5,0xAC,0x9C,0x4A,0x3F,0x11,0x31,0xDA,0x43,0x56,0x1A,0x2,0x2C,0xFC,0x82,0x1B,0xB2,0x18,0x96,0x26,0x08,0x32,0x9F,0x5E,0x2E,0x1C,0x32,0xFE,0x2C,0x28,0x0F,0xB3,0x11,0x7A,0xE1,0x09,0xB2,0x7A,0x76,0xE9,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x5D,0x06,0x5D,0x00,0x0F,0x03,0x02,0x15,0x06,0x02,0x04,07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0xBF,0xD5,0xD5,0x5B,0x3C,0x59,0x10,0x10,0xDE,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0xF,0xA7,0x00,0x00,0x08,0x42,0x5D,0xB0,0xE5,0x9A,0x15,0x2D,0x69,0x12,0x9E,0x11,0x31,0xDF,0xCB,0x52,0x1A,0xB2,0x30,0xA3,0x0F,0x1B,0xB2,0x1B,0x19,0x4F,0x08,0x32,0x9F,0x5C,0xE6,0x1C,0x33,0x00,0x5A,0xFE,0x0F,0xB3,0x10,0x10,0x48,0x7A,0x09,0xB2,0x7A,0x1F,0x45,0x00,0x00,00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x5E,0x06,0x5D,0x00,0x0F,0x03,0x03,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xD3,0x76,0xBB,0xBB,0xC4,0x92,0x70,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x5E,0xB0,0xE3,0x0E,0xBA,0xAC,0xD3,0x11,0x4E,0x11,0x31,0xE6,0xC2,0x14,0x1A,0xB2,0x31,0x42,0x11,0x1B,0xB2,0x1B,0xDB,0xAB,0x08,0x2,0xA2,0x65,0xB3,0x1C,0x33,0x00,0xC1,0xB6,0x0F,0xB3,0x0F,0x30,0xFC,0x09,0xB2,0x78,0xA0,0x8E,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x5F,0x06,0x5D,0x00,0x0F,0x03,0x04,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xD4,0x08,0xCC,0x3C,0x67,0x33,0xD1,0x00,0x08,0x24,0x33,0xD,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x5F,0xB0,0xE3,0xAB,0x0,0x2D,0x78,0x40,0x6F,0x11,0x31,0xE9,0x77,0xD4,0x1A,0xB2,0x30,0x7B,0xE0,0x1B,0xB2,0x21,0xD9,0x3B,0x08,0x32,0xA1,0xE4,0x2E,0x1C,0x33,0x00,0xBB,0x69,0x0F,0xB3,0x0E,0x57,0x54,0x09,0xB2,0x77,0x25,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x60,0x06,0x5D,0x00,0x0F,0x03,0x05,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xD1,0x26,0xB5,0xBC,0xE9,0xFE,0xCD,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x60,0xB0,0xE0,0x93,0x0B,0xAD,0xFB,0x40,0x25,0x11,0x31,0xF0,0x5A,0x70,0x1A,0xB2,0x32,0xFE,0x68,0x1B,0xB2,0x25,0xF4,0xA6,0x08,0x32,0xA1,0xBA,0x40,0x1C,0x33,0x01,0x11,0x5C,0x0F,0xB3,0x0D,0x25,0x06,0x09,0xB2,0x77,0xE3,0xAE,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x61,0x06,0x5D,0x00,0x0F,0x03,0x06,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xC5,0x59,0xD5,0x3C,0x03,0x14,0x6E,0x00,0x08,0x24,0x32,0x3D,0xB4,0xFA,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0x3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x61,0xB0,0xD3,0xE7,0x67,0x2D,0x0C,0xBE,0xF1,0x11,0x31,0xF2,0x0B,0x05,0x1A,0xB2,0x34,0x18,0x10,0x10,0x1B,0xB2,0x2C,0x3C,0x97,0x08,0x32,0xA1,0xFF,0xE9,0x1C,0x33,0x01,0x8B,0x1F,0x0F,0xB3,0x0B,0xBF,0x29,0x09,0xB2,0x7B,0xD0,0x8F,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x62,0x06,0x5D,0x00,0x0F,0x03,0x07,0x15,06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0xF,0xB8,0xE8,0xAB,0x3C,0xE6,0x73,0xAD,0x00,0x08,0x24,0x32,0x3D,0xB4,0xFA,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x62,0xB0,0xC6,0x8B,0x5C,0x2D,0xF7,0x72,0x20,0x11,0x31,0xF5,0xA0,0x36,0x1A,0xB2,0x32,0x41,0x7D,0x1B,0xB2,0x31,0x35,0xCA,0x08,0x32,0xA3,0xDA,0x0D,0x1C,0x33,0x02,0x85,0xEF,0x0F,0xB3,0x09,0x79,0xDC,0x09,0xB2,0x7B,0xB1,0x63,00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x63,0x06,0x5D,0x00,0x0F,0x03,0x08,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xB3,0x0C,0xBA,0x3C,0x20,0x5B,0x87,0x00,0x08,0x24,0x32,0x3D,0xB4,0xFA,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x63,0xB0,0xC0,0x40,0xCF,0x2D,0x2C,0x2E,0xBE,0x11,0x31,0xF7,0xD7,0xAA,0x1A,0xB2,0x31,0xC1,0x6F,0x1B,0xB2,0x34,0x59,0xD,0x08,0x32,0xA5,0xEA,0x52,0x1C,0x33,0x03,0x84,0xD2,0x0F,0xB3,0x07,0xBD,0xB4,0x09,0xB2,0x7B,0x1A,0x05,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x64,0x06,0x5D,0x00,0x0F,0x03,0x09,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xB6,0xDF,0x1A,0xBC,0x6C,0x6D,0xA9,0x00,0x08,0x24,0x32,0x3D,0xB4,0xFA,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x64,0xB0,0x4,0x5B,0x55,0xAD,0x7D,0xDC,0xEF,0x11,0x31,0xFA,0xB4,0x64,0x1A,0xB2,0x35,0xD6,0x85,0x1B,0xB2,0x38,0xDD,0xCB,0x08,0x32,0xA5,0x0F,0x18,0x1C,0x33,0x04,0x06,0x9E,0x0F,0xB3,0x05,0x78,0x68,0x09,0xB2,0x7A,0x08,0x4A,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x65,0x06,0x5D,0x00,0x0F,0x03,0x0A,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xBE,0xC0,0x5E,0x3C,0xDD,0x0F,0xA0,0x00,0x08,0x24,0x32,0x3D,0xB4,0xFA,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x65,0xB0,0xCC,0xD1,0x5B,0x2D,0xED,0x5C,0xCB,0x11,0x31,0xFE,0x41,0x27,0x1A,0xB2,0x3A,0x30,0x68,0x1B,0xB2,0x3E,0x95,0xDC,0x08,0x32,0xA3,0x0B,0x4F,0x1C,0x33,0x04,0x10,0x10,0xB,0x0F,0xB3,0x04,0x40,0x5E,0x09,0xB2,0x79,0x3C,0x4C,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x66,0x06,0x5D,0x00,0x0F,0x03,0x0B,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xD1,0x1C,0x46,0xBB,0xA7,0xBD,0x4C,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0xF,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x66,0xB0,0xE0,0x87,0xD7,0xAC,0xB4,0x1B,0xDD,0x11,0x31,0xFD,0xB,0xF2,0x1A,0xB2,0x3B,0xB2,0x73,0x1B,0xB2,0x43,0x2D,0xED,0x08,0x32,0xA1,0x95,0xE5,0x1C,0x33,0x04,0x4A,0x21,0x0F,0xB3,0x03,0x7C,0x46,0x09,0xB2,0x76,0x29,0x3D,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x67,0x06,0x5D,0x00,0x0F,0x03,0x0C,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,00,0xBF,0xDF,0x1D,0xF9,0x3C,0x0E,0xD7,0xB0,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x67,0xB0,0xEF,0x91,0xF5,0x2D,0x19,0x60,0x41,0x11,0x31,0xF7,0x64,0x67,0x1A,0xB2,0x41,0xBA,0xBD,0x1B,0xB2,0x47,0x58,0x53,0x08,0x32,0x9E,0xC4,0x7D,0x1C,0x33,0x04,0x10,0x10,0x05,0x0F,0xB3,0x02,0xF1,0xD9,0x09,0xB2,0x79,0xB5,0x41,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x68,0x06,0x5D,0x00,0x0F,0x03,0x0D,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0xC,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0xBF,0xE3,0x24,0x77,0x3C,0xA0,0x87,0xB7,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x1,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x68,0xB0,0xF3,0xE4,0x70,0x2D,0xAC,0x5E,0x30,0x11,0x31,0xF1,0xDE,0xC0,0x1A,0xB2,0x44,0xFF,0x00,0x1B,0xB2,0x4A,0x03,0x75,0x08,0x32,0x9E,0xA3,0xE3,0x1C,0x33,0x03,0xEE,0xD7,0x0F,0xB3,0x02,0x85,0x57,0x09,0xB2,0x7D,0x6D,0xFC,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x69,0x06,0x5D,0x00,0x0F,0x03,0x0E,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0xD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xE3,0xDB,0xC2,0xBB,0xB7,0x02,0xAE,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x69,0xB0,0xF4,0xA9,0x40,0xAC,0xC4,0x81,0x89,0x11,0x31,0xF8,0x23,0x6C,0x1A,0xB2,0x47,0xE9,0x03,0x1B,0xB2,0x4A,0x09,0x44,0x08,0x32,0x9D,0x72,0x5B,0x1C,0x33,0x04,0x65,0x41,0x0F,0xB3,0x02,0xC5,0xD2,0x09,0xB2,0x7E,0x8E,0x7C,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xB,0x00,0x08,0x42,0x6A,0x06,0x5D,0x00,0x0F,0x03,0x0F,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0xEE,0x06,0x2B,0xBC,0x3D,0xD5,0xFA,0x00,0x08,0x24,0x33,0x3D,0xB4,0xFF,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x6A,0xB0,0xFF,0x93,0x90,0xAD,0x4B,0xD5,0xAE,0x11,0x31,0xFC,0x5F,0xB7,0x1A,0xB2,0x4F,0x34,0x2E,0x1B,0xB2,0x49,0xCF,0xEB,0x08,0x32,0x9E,0x41,0x2B,0x1C,0x33,0x04,0x8,0xB7,0x0F,0xB3,0x02,0xEF,0x8C,0x09,0xB2,0x80,0x09,0x65,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x6B,0x06,0x5D,0x00,0x0F,0x03,0x10,0x10,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0xFD,0x89,0x3C,0x77,0x20,0x81,0x00,0x08,0x24,0x34,0x3D,0xB5,0x04,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x6B,0xB1,0x0B,0x93,0x7B,0x2D,0x84,0xAC,0xDF,0x11,0x1,0xFD,0x17,0x2F,0x1A,0xB2,0x51,0xDF,0x7A,0x1B,0xB2,0x4C,0x98,0x5F,0x08,0x32,0x9D,0x2B,0xC4,0x1C,0x33,0x04,0xAD,0x61,0x0F,0xB3,0x02,0x74,0x79,0x09,0xB2,0x82,0x2A,0x5D,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x6C,0x06,0x5D,0x00,0x0F,0x03,0x1,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x0B,0x59,0x6D,0x3D,0x03,0x62,0xA9,0x00,0x08,0x24,0x34,0x3D,0xB5,0x04,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x6C,0xB1,0x15,0xA0,0x0D,0x2E,0x0D,0x12,0xF1,0x11,0x31,0xF9,0x28,0x22,0x1A,0xB2,0x57,0x87,0x82,0x1B,0xB2,0x4F,0x48,0x58,0x08,0x32,0x9C,0x60,0x14,0x1C,0x33,0x04,0x7C,0x74,0x0F,0xB3,0x02,0x00,0x71,0x09,0xB2,0x85,0x3,0x12,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x6D,0x06,0x5D,0x00,0x0F,0x03,0x12,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1A,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x10,0x10,0x33,0xA9,0xBB,0xA6,0x26,0x73,0x00,0x08,0x24,0x34,0x3D,0xB5,0x04,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0x0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0x6D,0xB1,0x1A,0xD5,0xE3,0xAC,0xB2,0x67,0x04,0x11,0x31,0xF3,0xE8,0x94,0x1A,0xB2,0x62,0xED,0xF4,0x1B,0x2,0x52,0x39,0x27,0x08,0x32,0x9C,0x55,0x1D,0x1C,0x33,0x04,0x9F,0xCD,0x0F,0xB3,0x01,0x49,0x44,0x09,0xB2,0x86,0x67,0x0D,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0x10,0x8F,0xAB,0x00,0x08,0x42,0x6E,0x06,0x5D,0x00,0x0F,0x03,0x13,0x15,0x06,0x02,0x04,0x07,0xDB,0x10,0x03,0x10,0x6D,0x6D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x00,0x11,0x1B,0x08,0x1C,0x0F,0x09,0x10,0x03,0x10,0x8F,0xAC,0x07,0x00,0x00,0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x88,0x78,0x7A,0x3C,0x0C,0xB4,0x9A,00,0x08,0x24,0x38,0x3D,0xB5,0x18,0x00,0x42,0x0B,0x00,0x04,0x3F,0xE8,0xA3,0xA0,0x5F,0xFF,0xFF,0xEA,0xC0,0x01,0x31,0x5F,0xDF,0xFF,0xFF,0xFF,0x40,0x58,0xC6,0x66,0x6E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x10,0x03,0x10,0x8F,0xA7,0x00,0x00,0x08,0x42,0xE,0xB1,0x92,0x88,0xC1,0x2D,0x17,0x14,0xD3,0x11,0x31,0xAA,0xE9,0x39,0x1B,0xB2,0x73,0x60,0xC4,0x08,0x32,0x89,0x3F,0x77,0x1C,0x32,0xF8,0x82,0x7B,0x0F,0xB3,0x07,0x58,0xEA,0x09,0xB2,0x98,0x7D,0x5C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x03};


void TSIP (SoftwareSerial port, String id, String packet=0)
{
  byte buf[64];   //not sure what the right size for this is but this seems safe
  id.getBytes(buf,64);
  port.write(0x10);
  //port.write(buf,64);
  if(packet.length() != 0)
  {
    packet.getBytes(buf,64);
    //port.write(buf,64);
  }
  port.write(0x10);
  port.write(0x03);
}

int i(0);

void setup()
{
  char buff[17];
  gps.begin(9600);
  //Serial.begin(115200);
  //Serial.println("N7MG Thunderbolt GPSDO");
  ioinit();
  
  
  LCDInit();
  LCDContrast(45);  //can be set from 0 to 63
  LCDClear(WHITE);

  LCDPutStr("< N7MG GPSDO >",LINE_HEIGHT*1,(128-(8*14))/2,1,BLUE,WHITE);
  LCDPutStr("05:44:05 - 8Sats",LINE_HEIGHT*2,3,1,BLUE,WHITE);
  LCDPutStr("156 ppt | 116 nS",LINE_HEIGHT*3,(128-(16*8))/2,0,BLUE,WHITE);
  LCDPutStr("Phase Locked",LINE_HEIGHT*4,(128-(12*8))/2,0,BLUE,WHITE);
  LCDPutStr("GPSD Mode: Norm",LINE_HEIGHT*5,8,3,BLUE,WHITE);
  LCDPutStr("OverDet Clk",LINE_HEIGHT*6,8,3,BLUE,WHITE);
  LCDPutStr("No Errors",LINE_HEIGHT*7,(128-(9*8))/2,0,BLUE,WHITE);
  LCDPutStr("Hi Andrew",LINE_HEIGHT*8,(128-(9*8))/2,0,BLUE,WHITE);
  
  
  //TSIP(gps,0x1F);
}

void loop()
{
  //delay(1000);
  //send status request packet
  //TSIP(gps, 0x8EAC, 0x02);
  //String test;
  //test = 0x8EAC;
  //for(int i(0); i<sizeof(test); i++)
  //{
   // gps.print(test[i], BYTE);
  //}*/
  if(gps.available())
    gps.print((char)gps.read());
}

